package com.stellar.auth.basic.service.impl;

import com.stellar.auth.basic.dao.AuthUserRoleDao;
import com.stellar.auth.basic.entity.AuthUserRole;
import com.stellar.auth.basic.service.AuthUserRoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 用户角色关联表(AuthUserRole)服务实现
 *
 * @author Jqchan
 * @since 2025-05-16 18:07:44
 */
@Service
public class AuthUserRoleServiceImpl implements AuthUserRoleService {

    @Resource
    private AuthUserRoleDao authUserRoleDao;

    @Override
    public AuthUserRole queryById(Long id) {
        return authUserRoleDao.queryById(id);
    }

    @Override
    public AuthUserRole queryByCondition(AuthUserRole condition) {
        return authUserRoleDao.queryByCondition(condition);
    }

    @Override
    public List<AuthUserRole> queryAllByCondition(AuthUserRole condition) {
        return authUserRoleDao.queryAllByCondition(condition);
    }

    @Override
    public List<AuthUserRole> page(AuthUserRole condition, int page, int pageSize) {
        return authUserRoleDao.page(condition, page, pageSize);
    }

    @Override
    public int insert(AuthUserRole entity) {
        return authUserRoleDao.insert(entity);
    }

    @Override
    public int update(AuthUserRole entity) {
        return authUserRoleDao.update(entity);
    }

    @Override
    public int deleteById(Long id) {
        return authUserRoleDao.deleteById(id);
    }

    @Override
    public Long count(AuthUserRole condition) {
        return authUserRoleDao.count(condition);
    }

    @Override
    public List<AuthUserRole> queryByUserId(Long userId) {
        return authUserRoleDao.queryByUserId(userId);
    }
}
